package com.gzcstec.ftp.config;

import com.gzcstec.ftp.FTPClientPoolProperties;
import com.gzcstec.ftp.FTPService;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class FanAppConfig {
    @Bean
    @ConfigurationProperties("fan.ftp")
    public FTPClientPoolProperties ftpClientPoolProperties(){
        return new FTPClientPoolProperties();
    }

    @Bean
    public FTPService ftpService(FTPClientPoolProperties ftpClientPoolProperties){
        return new FTPService(ftpClientPoolProperties);
    }
}
